<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
    <div class='groupsmenu'>
    		<nav>
    			<ul>
    				<li><a href='FormGroups.php'>Form groups</a></li>
    				<li><a href='AddPeople.php'>Add people</a></li>
    				<li><a href='ViewGroups.php'>View Groups</a></li>
    				<li><a href='Users.php'>Back</a></li>
    				
    			</ul>
    		</nav>
    </div>
    
    <div id="groupscontent">
    	<h3>Current groups</h3>
    	<?php 
    	require 'dbconnect.php';
    	$result = mysql_query("SELECT * FROM groups");
    	
    	echo "<table border='1'>
        <tr>
            <th>Group name</th>
            <th>Start date</th>
            <th>End date</th>
            <th>Payment</th>
            <th>Description</th>
        </tr>";
    	
    	while($row = mysql_fetch_array($result)){
    	    echo "<tr>";
    	    echo "<td>". $row['groupname']. "</td>";
    	    echo "<td>". $row['startdate']. "</td>";
    	    echo "<td>". $row['enddate']. "</td>";
    	    echo "<td>". $row['payment']. "</td>";
    	    echo "<td>". $row['description']. "</td>";
    	}
    	
    	echo "</table>";
    	?>
    	
    	
    </div>

</body>
</html>











<?php
